/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package data;

import java.io.Serializable;
import sqlcommand.Command;

/**
 *
 * @author GREENWIND
 */
public class Cell implements Serializable {
    private String data;
    private int dataType; // luu kieu du lieu 0. so, 1. Chuoi
    private String name;// ten cua cell
    private Boolean isPrimaryKey;
    private String tableName;
    public Cell(String _data, int _dataType, String _name, Boolean primaryKey) {
        data = _data;
        dataType = _dataType;
        name = _name;
        isPrimaryKey = primaryKey;
    }
    public Cell(String _data, int _dataType, String _name, Boolean primaryKey, String table) {
        data = _data;
        dataType = _dataType;
        name = _name;
        isPrimaryKey = primaryKey;
        tableName = table;
    }
    public Cell(String _data, int _dataType, String _name) {
        data = _data;
        dataType = _dataType;
        name = _name;
        
    }

    public Cell(String _data, int _dataType) {
        data = _data;
        dataType = _dataType;
    }
    public Cell(){
        
    }
    public Cell(String _dat,String _colname)
    {
        this.data = _dat;
        this.name = _colname;
    }
    

    /**
     * @return the data
     */
    public String getData() {
        return data;
    }

    /**
     * @param data the data to set
     */
    public void setData(String data) {
        this.data = data;
    }

    /**
     * @return the dataType
     */
    public int getDataType() {
        return dataType;
    }

    /**
     * @param dataType the dataType to set
     */
    public void setDataType(int dataType) {
        this.dataType = dataType;
    }

    /**
     * @return the name
     */
    public String getName() {
        return Command.standardizeString(name);
    }

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @return the tableName
     */
    public String getTableName() {
        return tableName;
    }

    /**
     * @param tableName the tableName to set
     */
    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    
}
